import {atguiguRequest} from "@/request";


export interface CategoryType{
        id:number,
        name:string,
        category1Id?:number,
        category2Id?:number,
}

//请求一级分类getCategory1
export const reqCategory1 = ()=>{
    return atguiguRequest.get<null,CategoryType[]>(`/admin/product/getCategory1`)
}
//请求一级分类getCategory2
export const reqCategory2 = (category1Id:number)=>{
    return atguiguRequest.get<null,CategoryType[]>(`/admin/product/getCategory2/${category1Id}`)
}
//请求一级分类getCategory3
export const reqCategory3 = (category2Id:number)=>{
    return atguiguRequest.get<null,CategoryType[]>(`/admin/product/getCategory3/${category2Id}`)
}

